<template>
  <div>
    <button @click="$emit('changeMoney',800)">点我给零花钱</button>
    <p>{{ money }}</p>
  </div>
</template>

<script setup lang="ts">
const props=defineProps<{
  name?:string 
  money?:number
}>()
defineEmits<{(e:'changeMoney',money:number):void}>()
</script>

<style scoped>
</style>